<?php

/**
* Model des lots
*/
class Batch extends AppModel
{
	var $name = 'Batch';

	var $belongsTo = array('Project' =>
	                           array('className'  => 'Project',
	                                 'conditions' => '',
	                                 'order'      => '',
	                                 'foreignKey' => 'project_id'
	                           )
	                     );
	var $hasMany = array('Milestone' =>
	                         array('className'     => 'Milestone',
	                               'conditions'    => '',
	                               'order'         => 'position ASC',
	                               'limit'         => '',
	                               'foreignKey'    => 'batch_id',
	                               'dependent'     => true,
	                               'exclusive'     => false,
	                               'finderQuery'   => ''
	                         ),
							'Ticket' =>
	                         array('className'     => 'Ticket',
	                               'conditions'    => '',
	                               'order'         => '',
	                               'limit'         => '',
	                               'foreignKey'    => 'batch_id',
	                               'dependent'     => true,
	                               'exclusive'     => false,
	                               'finderQuery'   => ''
	                         ));
	var $validate = array(
	      'name' => VALID_NOT_EMPTY,
	      'project_id' => VALID_NUMBER
	   );
}

?>